A Formalization for Specifying and Implementing Correct Pull-Stream Modules

نویسندگان

  • Erick Lavoie
  • Laurie J. Hendren
چکیده

Pull-stream is a JavaScript demand-driven functional design pattern based on callback functions that enables the creation and easy composition of independent modules that are used to create streaming applications. It is used in popular open source projects and the community around it has created over a hundred compatible modules. While the description of the pull-stream design pattern may seem simple, it does exhibit complicated termination cases. Despite the popularity and large uptake of the pull-stream design pattern, there was no existing formal specification that could help programmers reason about the correctness of their implementations. Thus, the main contribution of this paper is to provide a formalization for specifying and implementing correct pull-stream modules based on the following: (1) we show the pull-stream design pattern is a form of declarative concurrent programming; (2) we present an event-based protocol language that supports our formalization, independently of JavaScript; (3) we provide the first precise and explicit definition of the expected sequences of events that happen at the interface of two modules, which we call the pull-stream protocol; (4) we specify reference modules that exhibit the full range of behaviors of the pull-stream protocol; (5) we validate our definitions against the community expectations by testing the existing core pull-stream modules against them and identify unspecified behaviors in existing modules. Our approach helps to better understand the pull-stream protocol, to ensure interoperability of community modules, and to concisely and precisely specify new pull-stream abstractions in papers and documentation. 1998 ACM Subject Classification D.3.m Miscellaneous

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

QueueLinker: A Framework for Parallel Distributed Processing of Data Streams

With the development of computer systems, many more devices are being connected to the network and generating ‘data stream.’ Analyzing data streams in real-time offers valuable information about human activities and contributes to many information services. QueueLinker enables programmers to build data stream processing applications by implementing application modules that use a producer–consum...

متن کامل

Formalizing Refinements and Constructive Algebra in Type Theory

The extensive use of computers in mathematics and engineering has led to an increased demand for reliability in the implementation of algorithms in computer algebra systems. One way to increase the reliability is to formally verify that the implementations satisfy the mathematical theorems stating their specification. By implementing and specifying algorithms from computer algebra inside a proo...

متن کامل

A Dialog Flow Notation for Web-based Applications

Increasingly, client-server applications are implemented as web-based applications with user interfaces consisting entirely of web pages or equivalent renderings on other presentation channels (e.g. mobile or speech-based devices). However, the page-based medium and the stateless pull communication impose restrictions on the user interface that often manifest themselves in unsatisfactory dialog...

متن کامل

Edon - library of reconfigurable cryptographic primitives suitable for embedded systems

In this paper we describe several programming modules which perform string transformations with quasigroups. The modules use one or two quasigroups of order 16, thus, taking only 128 bytes for storage per quasigroup. Using those modules as cryptographic primitives we develop a block cipher, a stream cipher, a hash function with variable length of output that is strongly collision free and a pse...

متن کامل

A formal abstract framework for modeling and testing complex software systemsI

The contribution of this paper is twofold: first, it defines a unified framework for modeling abstract components, as well as a formalization of integration rules to combine their behaviour. This is based on a coalgebraic definition of components, which is a categorical representation allowing the unification of a large family of formalisms for specifying state-based systems. Second, it studies...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1801.06144  شماره 

صفحات  -

تاریخ انتشار 2018